package Example;
class  Animal3{
    //定义动物叫的方法
    void shout(){
        System.out.println("动物发出叫声");
    }
}
//定义Dog类继承Anmail类
class Dog3 extends Animal{
    void shout(){
        System.out.println("汪汪汪……");
    }
}
public class si3 {
    public static void main(String[] args) {
        Dog3 dog3 = new Dog3();
        dog3.shout();
    }
}
